package com.ruoyi.property.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.property.mapper.FeeDiscountConfigMapper;
import com.ruoyi.property.domain.FeeDiscountConfig;
import com.ruoyi.property.service.IFeeDiscountConfigService;
import com.ruoyi.common.core.text.Convert;

/**
 * 费用折扣Service业务层处理
 * 
 * @author sux
 * @date 2021-08-24
 */
@Service
public class FeeDiscountConfigServiceImpl implements IFeeDiscountConfigService
{
    @Autowired
    private FeeDiscountConfigMapper feeDiscountConfigMapper;

    /**
     * 查询费用折扣
     * 
     * @param feeDiscountId 费用折扣ID
     * @return 费用折扣
     */
    @Override
    public FeeDiscountConfig selectFeeDiscountConfigById(Long feeDiscountId)
    {
        return feeDiscountConfigMapper.selectFeeDiscountConfigById(feeDiscountId);
    }

    /**
     * 查询费用折扣列表
     * 
     * @param feeDiscountConfig 费用折扣
     * @return 费用折扣
     */
    @Override
    public List<FeeDiscountConfig> selectFeeDiscountConfigList(FeeDiscountConfig feeDiscountConfig)
    {
        return feeDiscountConfigMapper.selectFeeDiscountConfigList(feeDiscountConfig);
    }

    /**
     * 新增费用折扣
     * 
     * @param feeDiscountConfig 费用折扣
     * @return 结果
     */
    @Override
    public int insertFeeDiscountConfig(FeeDiscountConfig feeDiscountConfig)
    {
        return feeDiscountConfigMapper.insertFeeDiscountConfig(feeDiscountConfig);
    }

    /**
     * 修改费用折扣
     * 
     * @param feeDiscountConfig 费用折扣
     * @return 结果
     */
    @Override
    public int updateFeeDiscountConfig(FeeDiscountConfig feeDiscountConfig)
    {
        return feeDiscountConfigMapper.updateFeeDiscountConfig(feeDiscountConfig);
    }

    /**
     * 删除费用折扣对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFeeDiscountConfigByIds(String ids)
    {
        return feeDiscountConfigMapper.deleteFeeDiscountConfigByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除费用折扣信息
     * 
     * @param feeDiscountId 费用折扣ID
     * @return 结果
     */
    @Override
    public int deleteFeeDiscountConfigById(Long feeDiscountId)
    {
        return feeDiscountConfigMapper.deleteFeeDiscountConfigById(feeDiscountId);
    }
}
